package com.ruoyi.lvlian.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.utils.StringUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 莱回收订单项对象 lhs_order_item
 *
 * @author ruoyi
 * @date 2025-07-23
 */
@Data
@ToString
@ApiModel(value = "莱回收订单项对象", description = "莱回收订单项对象")
public class LhsOrderItem {
    private static final long serialVersionUID = 1L;
    private String id;

    @ApiModelProperty(value = "就是id的值，组合是为了去重")
    private String orderItemId;

    /** $column.columnComment */
    @ApiModelProperty(value = "订单号")
    private String orderNum;
    /** 单价 */
    @ApiModelProperty(value = "单价")
    private double price;

    /** 商品id */
    @ApiModelProperty(value = "商品id")
    private String productId;

    /** 数量 */
    @ApiModelProperty(value = "数量")
    private Integer quantity;

    /** 毛重 */
    @ApiModelProperty(value = "毛重")
    private double grossWeight;

    /** 净重 */
    @ApiModelProperty(value = "净重")
    private double netWeight;

    /** 皮重 */
    @ApiModelProperty(value = "皮重")
    private double tareWeight;

    /** 录入人 */
    @ApiModelProperty(value = "录入人")
    private String createUser;

    /** 录入日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "录入日期 ")
    private String createDate;

    /** 一级分类id */
    @ApiModelProperty(value = "一级分类id")
    private Long categoryLevelId1;

    /** 二级分类id */
    @ApiModelProperty(value = "二级分类id")
    private Long categoryLevelId2;

    /** 最低价格 */
    @ApiModelProperty(value = "最低价格")
    private double lowPrice;

    /** 最高价格 */
    @ApiModelProperty(value = "最高价格")
    private double highPrice;

    /** 一级分类名字 */
    @ApiModelProperty(value = "一级分类名字")
    private String categoryLevelName1;

    /** 二级分类名字 */
    @ApiModelProperty(value = "二级分类名字")
    private String categoryLevelName2;

    public String getId() {
        if(StringUtils.isNotEmpty( orderItemId) &&  !id.equalsIgnoreCase(orderItemId)){
            id=orderItemId;
        }

        return id;
    }
}
